How do I iterate through nested lists of binary digits and append their decimal number to a list